<html>
<head>
  <meta HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=ISO-8859-1">
  <title>Contents.m</title>
<link rel="stylesheet" type="text/css" href="../stpr.css">
</head>
<body>
<table  border=0 width="100%" cellpadding=0 cellspacing=0><tr valign="baseline">
<td valign="baseline" class="function"><b class="function">RSPOLY2</b>
<td valign="baseline" align="right" class="function"><a href="../kernels/index.html" target="mdsdir"><img border = 0 src="../up.gif"></a></table>
  <p><b>Reduced set method for second order homogeneous polynomial kernel.</b></p>
  <hr>
<div class='code'><code>
<span class=help></span><br>
<span class=help>&nbsp;<span class=help_field>Synopsis:</span></span><br>
<span class=help>&nbsp;&nbsp;red_model&nbsp;=&nbsp;rspoly2(model)</span><br>
<span class=help>&nbsp;&nbsp;red_model&nbsp;=&nbsp;rspoly2(model,max_nsv)</span><br>
<span class=help></span><br>
<span class=help>&nbsp;<span class=help_field>Description:</span></span><br>
<span class=help>&nbsp;&nbsp;It&nbsp;uses&nbsp;reduced&nbsp;set&nbsp;techique&nbsp;to&nbsp;reduce&nbsp;complexity</span><br>
<span class=help>&nbsp;&nbsp;of&nbsp;the&nbsp;kernel&nbsp;expansion&nbsp;with&nbsp;second&nbsp;order&nbsp;homogeneous&nbsp;polynomial&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;kernel&nbsp;k(x,y)&nbsp;=&nbsp;(x'*y)^2&nbsp;=&nbsp;kernel(x,y,'poly',2)&nbsp;.</span><br>
<span class=help></span><br>
<span class=help>&nbsp;&nbsp;The&nbsp;method&nbsp;was&nbsp;published&nbsp;in&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;J.C.Burges:&nbsp;Simplified&nbsp;Support&nbsp;Vector&nbsp;Decision&nbsp;Rules.&nbsp;ICML,&nbsp;1996.</span><br>
<span class=help>&nbsp;&nbsp;</span><br>
<span class=help>&nbsp;<span class=help_field>Input:</span></span><br>
<span class=help>&nbsp;&nbsp;model&nbsp;[struct]&nbsp;Kernel&nbsp;expansion:</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.Alpha&nbsp;[nsv&nbsp;x&nbsp;1]&nbsp;Weights&nbsp;of&nbsp;kernel&nbsp;expansion.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.b&nbsp;[1x1]&nbsp;Bias.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.sv.X&nbsp;[dim&nbsp;x&nbsp;nsv]&nbsp;Support&nbsp;vectors.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.options.ker&nbsp;=&nbsp;'poly'</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.options.arg&nbsp;=&nbsp;[2&nbsp;0]</span><br>
<span class=help></span><br>
<span class=help>&nbsp;&nbsp;max_nsv&nbsp;[1x1]&nbsp;Maximal&nbsp;number&nbsp;of&nbsp;new&nbsp;support&nbsp;vectors.&nbsp;If&nbsp;not&nbsp;given&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;then&nbsp;the&nbsp;new&nbsp;expansion&nbsp;approximates&nbsp;the&nbsp;original&nbsp;one&nbsp;exactly&nbsp;with</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;at&nbsp;most&nbsp;dim&nbsp;support&nbsp;vectors.&nbsp;</span><br>
<span class=help></span><br>
<span class=help>&nbsp;<span class=help_field>Output:</span></span><br>
<span class=help>&nbsp;&nbsp;red_model&nbsp;[struct]&nbsp;Reduced&nbsp;kernel&nbsp;expansion:</span><br>
<span class=help>&nbsp;&nbsp;red_model.Alpha&nbsp;[new_nsv&nbsp;x&nbsp;1]&nbsp;New&nbsp;weights.</span><br>
<span class=help>&nbsp;&nbsp;red_model.b&nbsp;[scalar]&nbsp;Bias.</span><br>
<span class=help>&nbsp;&nbsp;red_model.sv.X&nbsp;[dim&nbsp;x&nbsp;new_nsv]&nbsp;New&nbsp;support&nbsp;vectors.</span><br>
<span class=help>&nbsp;&nbsp;...</span><br>
<span class=help></span><br>
<span class=help>&nbsp;<span class=help_field>Example:</span></span><br>
<span class=help>&nbsp;&nbsp;trn&nbsp;=&nbsp;load('riply_trn');</span><br>
<span class=help>&nbsp;&nbsp;model&nbsp;=&nbsp;smo(trn,struct('ker','poly','arg',[2&nbsp;0],'C',10));</span><br>
<span class=help>&nbsp;&nbsp;red_model&nbsp;=&nbsp;rspoly2(&nbsp;model&nbsp;);</span><br>
<span class=help>&nbsp;&nbsp;figure;&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;subplot(1,2,1);&nbsp;axis&nbsp;square;&nbsp;ppatterns(trn);&nbsp;psvm(model);</span><br>
<span class=help>&nbsp;&nbsp;subplot(1,2,2);&nbsp;axis&nbsp;square;&nbsp;ppatterns(trn);&nbsp;psvm(red_model);</span><br>
<span class=help>&nbsp;&nbsp;</span><br>
<span class=help>&nbsp;<span class=also_field>See also </span><span class=also></span><br>
<span class=help><span class=also>&nbsp;&nbsp;<a href = "../kernels/rsrbf.html" target="mdsbody">RSRBF</a>.</span><br>
<span class=help></span><br>
</code></div>
  <hr>
  <b>Source:</b> <a href= "../kernels/list/rspoly2.html">rspoly2.m</a>
  <p><b class="info_field">About: </b>  Statistical Pattern Recognition Toolbox<br>
 (C) 1999-2004, Written by Vojtech Franc and Vaclav Hlavac<br>
 <a href="http://www.cvut.cz">Czech Technical University Prague</a><br>
 <a href="http://www.feld.cvut.cz">Faculty of Electrical Engineering</a><br>
 <a href="http://cmp.felk.cvut.cz">Center for Machine Perception</a><br>

  <p><b class="info_field">Modifications: </b> <br>
 22-dec-2004, VF, header and comments added<br>
 28-nov-2003, VF<br>

</body>
</html>
